package com.example.demo2.mapper;

import com.example.demo2.entity.ComparisonResults;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Param;

import java.util.List;


@Mapper
public interface ComparisonResultsMapper {
    void insertComparisonResult(
            @Param("molecularWeight") double molecularWeight,
            @Param("rtMin") double rtMin,
            @Param("result") double result,
            @Param("content") String content,
            @Param("name") String name,
            @Param("formula") String formula
    );

    List<ComparisonResults> findByName(@Param("name") String name, @Param("offset") int offset, @Param("size") int size);

    long countByName(@Param("name") String name);
    void batchInsertComparisonResults(List<ComparisonResults> list);
    List<ComparisonResults> findByComparisonName(@Param("comparisonName") String comparisonName,
                                                 @Param("offset") int offset, @Param("size") int size);

    long countByComparisonName(@Param("comparisonName") String comparisonName);
}